import request from '@/utils/request'

// api地址
const api = {
  addCart: '/oms/yoshopCart/save',
  list:'/oms/yoshopCart/list',
  del:'/oms/yoshopCart/delete'
}

// 购物车列表
export const list = (data) => {
  return request.get(api.list,data, { load: false })
}

// 购物车记录添加
export const add = (data) => {
  return request.post(api.addCart,data)
}
// 购物车记录修改
export const edit = (data) => {
  return request.post(api.addCart,data, { load: false })
}


// 购物车记录添加
export const del = (param) => {
  let params=`?ids=${param.ids}`;
  return request.post(api.del+params)
}